package com.andnnl.dao.base;

import com.andnnl.pojo.base.EmasUcinfo;
import org.beetl.sql.core.annotatoin.Param;
import org.beetl.sql.core.annotatoin.Sql;
import org.beetl.sql.core.mapper.BaseMapper;
import org.springframework.stereotype.Component;

/**
 * Created by chenss on 2019/5/13.
 */
@Component
public interface EmasUcinfoDao extends BaseMapper<EmasUcinfo> {


    /**
     * @param id
     * @param fax
     * @param classInt
     */
    public int updateFax(@Param("id") int id, @Param("fax") String fax, @Param("classInt") int classInt);

    /**
     * 短信条数回滚
     *
     * @param uid
     * @param num
     * @return
     */
    public int callbackBalance(@Param("uid") String uid, @Param("num") int num);

    /**
     * 短信条数扣除
     *
     * @param uid
     * @param num
     * @return
     */
    public int deductBalance(@Param("uid") String uid, @Param("num") int num);

    /**
     * @param id
     * @param md
     */
    public int updatePasswd(@Param("id") int id, @Param("md") String md);


    @Sql("delete TBL_EMAS_UCINFO where username=?")
    int deleteByUsername(String username);
}
